package com.area.cth.mapper;

import com.area.cth.pojo.Feedback;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface FeedbackMapper  extends BaseMapper<Feedback> {
    @Insert("insert into feedback(type,content,contact,create_time) " +
            "values (#{type},#{content},#{contact},now())")
    void submitFeedback(Feedback feedback);

    @Delete("delete from feedback where id=#{id}")
    void deleteFeedback(Integer id);

    @Select("select * from feedback where id=#{id}")
    Feedback getFeedbackDetail(Integer id);
}
